Passed
Push — master ( fd5993...4f9324 )
by Vinicius
03:57 queued 01:54
created

pageTitleMixin.created   A

Complexity

Conditions 3
Paths 3

Size

Total Lines 10
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 3

Importance

Changes 0
Metric Value
cc 3
eloc 6
nc 3
nop 0
dl 0
loc 10
ccs 3
cts 3
cp 1
crap 3
rs 10
c 0
b 0
f 0
1 2
import { isFunction } from './utils'
2
3 2
const pageTitleMixin = {
4
  created () {
5 10
    const { title } = this.$options
6
7 10
    if (title !== undefined) {
8
      // allow use dinamic title system
9 5
      this.$title = isFunction(title)
10
        ? title.call(this, this)
11
        : title
12
    }
13
  }
14
}
15
16
export default pageTitleMixin
17